<el-dialog title="用户角色设置" :visible.sync="show" :modal-append-to-body="false"
           :close-on-click-modal="false" custom-class="userRoleDialog"
           @close="afterClose">
    <el-transfer
            filterable
            :filter-method="filterRole"
            filter-placeholder="请输入角色名称"
            :titles="['可用角色','已有角色']"
            :button-texts="['移除', '增加']"
            v-model="userRoles"
            :props="{key: 'id', label: 'name'}"
            :data="allRoles"
            >
    </el-transfer>
    </el-form>
    <div slot="footer">
        <el-button type="primary" size="small" @click="saveRole">确认</el-button>
        <el-button size="small" @click="close">取消</el-button>
    </div>
</el-dialog>
